package com.ayla.demo.widgets.touch

import androidx.recyclerview.widget.RecyclerView
import androidx.viewbinding.ViewBinding
import com.ayla.demo.widgets.holder.BinderViewHolder

interface ITouch {
    fun onDrag(viewHolder: RecyclerView.ViewHolder, actionState: Int)

    fun onMove(
        source: RecyclerView.ViewHolder,
        sourcePosition: Int,
        target: RecyclerView.ViewHolder,
        targetPosition: Int
    ):Boolean

    fun onSwipe(viewHolder: RecyclerView.ViewHolder, actionState: Int)

    fun onEnd(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder)
}

interface IBinderTouch<VB: ViewBinding> {
    fun onDrag(holder: BinderViewHolder<VB>)
    fun onEnd(holder: BinderViewHolder<VB>)
}